package com.guguguweb.rpc.net.client;


import com.guguguweb.rpc.entity.RpcRequest;
import com.guguguweb.rpc.entity.RpcResponse;
import com.guguguweb.rpc.net.client.imp.UnprocessedRequests;
import com.guguguweb.rpc.register.ServiceDiscovery;
import com.guguguweb.rpc.serializer.CommonSerializer;

import java.util.concurrent.CompletableFuture;

/**
 * @description 客户端类通用接口
 */
public interface GuRpcClient {

    int DEFAULT_SERIALIZER = CommonSerializer.PROTOBUF_SERIALIZER;
    long DEFAULT_MAX_WAIT_TIME = 10000L;

    CompletableFuture<RpcResponse> sendRequest(RpcRequest rpcRequest);

    UnprocessedRequests getRequestsMap();

    ServiceDiscovery getServiceDiscovery();

    long getMaxWaitTime();
}
